<template>
    <!-- 题目卡片 -->
    <view class="container" @tap="goDetail">
        <view class="title">{{ item.question }}</view>
        <!-- <view class="origin">来自题库:《{{ categoryQuestion[item.category].title }}》</view> -->
        <view class="origin">来自题库:《{{ categoryQuestion[item.category - 1] }}》</view>    </view>
</template>
<script setup lang="ts">
import type { QuestionItem } from '@/type/question';
import { categoryQuestion } from '@/utils/hook'
const props = defineProps<{
    item: QuestionItem
}>();
const goDetail = () => {
    uni.navigateTo({ url: `/my_modules/questionDetail/questionDetail?id=${props.item.id}` })
}
</script>
<style scoped lang="scss">
.container {
    padding: 20rpx;
    margin: 20rpx;
    font-size: 30rpx;
    border-radius: 10rpx;
    color: #666;
    background-color: #fff;
    box-shadow: $shadow;

    .title {
        font-size: 32rpx;
        font-weight: 700;
    }

    .origin {
        margin: 10rpx 0;
        font-size: 24rpx;
    }
}
</style>
